using System;

namespace facade.Singleton
{
    /// <summary>
    /// 懒汉模式
    /// </summary>
    public class Singleton2
    {
        private static Singleton2 singleObj;
         private Singleton2()
        {
            
        }

        public static Singleton2 GetSingleton2()
        {
            if(singleObj==null)
            {
                singleObj= new Singleton2();
            }
            return singleObj;
        }
    }
}